@primaryColor: #6253e1;

/* 滚动条整体样式 */
::-webkit-scrollbar {
  width: 12px;
  /* 滚动条宽度 */
}

/* 滚动条轨道样式 */
::-webkit-scrollbar-track {
  background: #f1f1f1;
  /* 轨道背景色 */
  border-radius: 12px;
  /* 轨道圆角 */
}

/* 滚动条滑块样式 */
::-webkit-scrollbar-thumb {
  background: #b9bbbd;
  /* 滑块背景色 */
  border-radius: 12px;
  /* 滑块圆角 */
}

/* 滑块在悬停时的样式 */
::-webkit-scrollbar-thumb:hover {
  cursor: pointer;
  background: #a6a9ac;
  /* 悬停时的背景色 */
  transform: scale(1.2);
  /* 悬停时放大 */
}

/* 横向滚动条整体样式 */
::-webkit-scrollbar:horizontal {
  height: 12px;
  /* 横向滚动条高度 */
}

/* 横向滚动条轨道样式 */
::-webkit-scrollbar-track:horizontal {
  background: #f1f1f1;
  /* 轨道背景色 */
  border-radius: 12px;
  /* 轨道圆角 */
}

/* 横向滚动条滑块样式 */
::-webkit-scrollbar-thumb:horizontal {
  background: #b9bbbd;
  /* 滑块背景色 */
  border-radius: 12px;
  /* 滑块圆角 */
}

/* 横向滑块在悬停时的样式 */
::-webkit-scrollbar-thumb:hover:horizontal {
  cursor: pointer;
  background: #a6a9ac;
  /* 悬停时的背景色 */
  transform: scale(1.2);
  /* 悬停时放大 */
}

body {
  margin: 0 !important;
  padding: 13px !important;
}

#header, #footer {
  .links {
    .form form {
      display: inline-flex !important;
      align-items: center;
    }
  }
}

.monaco-editor {
  width: 100% !important;
  height: 100% !important;
}

.navigation {
  padding: 2px;
}

.bz_query_buttons[valign='middle'] {
  display: flex;

  form:not(:last-child) {
    margin-right: 10px;
  }
}

.custom-button {
  display: inline-flex;
  align-items: center !important;
  width: fit-content !important;
  height: fit-content !important;
  background: @primaryColor;
  border-radius: 4px !important;
  color: #fff !important;
  inset: 0;
  opacity: 1;
  transition-duration: 0.3s;
  transition-property: box-shadow, opacity, color, border;
  padding: 4px 12px !important;
  font-weight: 400;
  font-size: 12px;
  margin: 0 5px; 
  box-sizing: border-box;
  min-height: 28px;
  max-height: 28px;
  text-decoration: none;
  line-height: 19px;
  border: 1px solid transparent;

  &:hover {
    cursor: pointer;
    color: #fff;
    box-shadow: 0 0 2px 0 @primaryColor;
  }

  &:visited {
    color: #fff;
  }
}

.plain-button {
  background: #ffffff !important;
  color: #757575 !important;
  border: 1px solid #cccccc !important;
  text-decoration: none !important;

  &:hover {
    color: @primaryColor !important;
    border: 1px solid @primaryColor !important;
  }
}

.disabled-button {
  cursor: not-allowed !important;
  border-color: #d9d9d9 !important;
  color: rgba(0, 0, 0, 0.25) !important;
  background: rgba(0, 0, 0, 0.04) !important;
  box-shadow: none !important;
  pointer-events: none !important;

  &:hover {
    border-color: #d9d9d9 !important;
    color: rgba(0, 0, 0, 0.25) !important;
    box-shadow: none !important;
  }
}

.field_label {
  vertical-align: middle !important;
}

select {
  height: 28px;
  border-radius: 4px;
  padding: 4px;
  border-color: #d9d9d9;
  box-sizing: border-box;

  &:hover {
    cursor: pointer;
  }

  &:focus-visible {
    outline: #d9d9d9;
  }
}

#assigned_to_list_vue_app {
  height: 28px;
  .n-base-selection-label {
    height: 28px;
  }
}

input:not([class="n-input__input-el"])[type='checkbox'] {
  &:hover {
    cursor: pointer;
  }
}

input:not([class="n-input__input-el"])[type='radio'] {
  &:hover {
    cursor: pointer;
  }
}

input:not([class="n-input__input-el"]):not([type='radio']):not([type='checkbox']):not([type='range']):not([type='color']):not([type='hidden']):not([type='reset']):not([type='file']) {
  height: 28px !important;
  border-radius: 4px;
  padding: 0 6px;
  outline: 0px solid transparent;
  border: 1px solid #d9d9d9;
  box-sizing: border-box;
}

textarea {
  border-radius: 4px;
  padding: 4px;
  outline: 0px solid transparent;
  border: 1px solid #d9d9d9;
}

#status {
  margin-bottom: unset;
  align-items: center;
  display: flex;
  margin-top: 3px;
}

.knob-buttons:has(input[id='commit']) {
  margin-top: 4px;
}

#bug_status {
  margin: 0 6px;
}

.bz_section_spacer {
  display: none;
}

#bz_assignee_input {
  width: 543px;
}

#set_default_assignee_label {
  display: none;
}

#set_default_assignee {
  display: none;
}

.bz_assignee_td {
  display: flex;
  align-items: center;
  width: 598px;
}

#bz_show_bug_column_1 {
  min-width: 700px;

  tr th {
    min-height: 34px !important;
  }

  tr:has(th[id='field_label_tag']) {
    transform: translateY(2px);
  }

  tr:has(th[id='field_label_dependson']) {
    transform: translateY(4px);
  }

  tr:has(th[id='field_label_blocked']) {
    transform: translateY(6px);
  }

  tr:has(td[id='show_dependency_tree_or_graph']) {
    display: none;
  }

  tr td {
    min-height: 34px !important;
  }
}

#bz_show_bug_column_2 {
  width: calc(100vw - 700px);

  table tr td {
    max-width: 800px;
  }
}

#cf_newfeatureid {
  width: 100%;
}

.global-message {
  width: fit-content;
  height: fit-content;
  padding: 8px 24px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  position: fixed;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999999;
  background-color: #ffffff;
  border-radius: 4px;
  transition: opacity 0.5s ease-in-out, top 0.5s ease-in-out;
  animation: message-fadein 0.5s ease-in-out forwards;
  box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.2);
}

.global-message_text {
  margin-left: 8px;
  font-size: 14px;
}

@keyframes message-fadein {
  0% {
    opacity: 0.5;
    top: 10px;
  }

  100% {
    opacity: 1;
    top: 30px;
  }
}

@keyframes dialog-fadein {
  0% {
    opacity: 0.5;
    top: 46%;
  }

  100% {
    opacity: 1;
    top: 50%;
  }
}

@keyframes loading {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.global-dialog {
  height: fit-content;
  max-width: 100vw;
  max-height: 100vh;
  z-index: 9999;
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #ffffff;
  border-radius: 4px;
  transition: opacity 0.5s ease-in-out, top 0.5s ease-in-out;
  animation: dialog-fadein 0.5s ease-in-out forwards;

  .control-btn {
    &:hover {
      cursor: pointer;
    }
  }

  .control-btn:not(:last-child) {
    margin-right: 8px;
  }

  .close-btn:hover {
    filter: drop-shadow(0px 0px 2px #ff5953);
  }

  .exit-full-screen-btn:hover {
    filter: drop-shadow(0px 0px 2px #fabe33);
  }

  .full-screen-btn:hover {
    filter: drop-shadow(0px 0px 2px #53c32b);
  }
}

.global-dialog-header {
  padding: 6px 12px;
  background-color: #f5f5f5;
  border-radius: 4px 4px 0 0;
}

.global-dialog-footer {
  padding: 6px 12px;
  background-color: #f5f5f5;
  border-radius: 0 0 4px 4px;
  display: flex;
  justify-content: flex-end;
  box-sizing: border-box;
}

.global-dialog-body {
  max-width: 100%;
  max-height: calc(100% - 68px);
  height: 100%;
  padding: 12px 24px;
  overflow-y: auto;
  overflow-x: auto;
  box-sizing: border-box;
}

.global-dialog-mask {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.global-dialog-mask-transparent {
  background-color: transparent;
}

.global-loading {
  width: 100%;
  height: 100%;
  position: relative;

  &::after {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid @primaryColor;
    border-left: 2px solid transparent;
    border-radius: 50%;
    position: absolute;
    top: calc(50% - 10px);
    left: calc(50% - 10px);
    transform: translate(-50%, -50%);
    animation: loading 1.5s infinite linear;
    background-color: transparent;
  }
}

.attachment-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: auto;
}

.flex {
  display: flex;
}
.flex-wrap {
  flex-wrap: wrap;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}
.flex-align-center {
  display: flex;
  align-items: center;
}
.flex-justify-center {
  display: flex;
  justify-content: center;
}
.flex-justify-space-between {
  display: flex;
  justify-content: space-between;
}
.flex-justify-end {
  display: flex;
  justify-content: flex-end;
}

.show {
  display: block;
}

.hide {
  display: none;
}

.cursor-pointer {
  &:hover {
    cursor: pointer;
  }
}

.text-underline {
  text-decoration: underline;
}

.font-size-16px {
  font-size: 16px;
}

.margin-right-8px {
  margin-right: 8px;
}

.margin-left-8px {
  margin-left: 8px;
}

.margin-bottom-8px {
  margin-bottom: 8px;
}

.margin-top-8px {
  margin-top: 8px;
}

.link-title {
  font-weight: bold;
  transition: all 0.3s ease-in-out;
}

.link-title:hover {
  color: @primaryColor !important;
  text-decoration: unset !important;
  font-size: 14px;
}

.separator {
  margin: 0 6px 0 4px;
  color: #cccccc;
}

.links .form a[title="Quicksearch Help"] {
  margin-left: 6px;
}

#attachment_table {
  border: 1px solid #d9d9d9;
}

#attachment_table td {
  border: 1px solid #d9d9d9;
}

#attachment_table tr td[valign="top"]:nth-child(2):has(a) {
  .flex-center;
}

.bz_short_desc_column a {
  color: #595959;
  font-weight: bold;
}

#summary_field.search_field_row input {
  padding-bottom: unset !important;
  vertical-align: middle;
}

#short_desc {
  padding-bottom: unset !important;
}

#summary_field.search_field_row select {
  padding-bottom: 4px;
  vertical-align: middle;
}

.bz_quip {
  display: block;
  color: #b1b1b1;
  font-weight: bold;
  font-size: 12px;
  font-style: italic;
  margin-top: 8px;
  font-family: '黑体';
}

.bz_query_timestamp {
  color: #b1b1b1;
  font-style: normal;
  font-size: 14px;
  display: inline-block;
  font-family: '黑体';
}

.n-base-selection__border, .n-base-selection__state-border {
  display: none;
}

.n-checkbox .n-checkbox-box .n-checkbox-icon {
  transform: rotate(-12deg) translate(0.5px, 1px);
}

@rotate-turn-setting-city: rotate-turn-setting-city;

.rotate-animation(@translateY, @rotate, @name) {
  @keyframes @name {
    0% {
      transform: translateY(@translateY) rotate(0deg);
    }

    100% {
      transform: translateY(@translateY) rotate(@rotate);
    }
  }
}

#setting-city {
  display: inline-block;
  color: cornflowerblue;

  &:hover {
    cursor: pointer;
  }

  svg {
    transition: all .3s;
    transform: translateY(3px);
    font-size: 16px;

    &:hover {
      animation-iteration-count: 1;
      animation: @rotate-turn-setting-city .2s linear;
    }
  }
}

.rotate-animation(3px, 0.3turn, @rotate-turn-setting-city);

#component_list_vue_app {
  height: 28px;
  width: 400px;
  .n-base-selection-label {
    height: 28px;
  }
}

#version_list_vue_app {
  height: 28px;
  width: 400px;
  .n-base-selection-label {
    height: 28px;
  }
}

#cc_list_vue_app {
  height: 28px;
  width: 400px;
  .n-base-selection-label {
    height: 28px;
  }
}

#newcc_list_vue_app {
  height: 28px;
  width: 400px;
  .n-base-selection-label {
    height: 28px;
  }
}

#feature_list_vue_app {
  height: 28px;
  min-width: 200px;
  max-width: 800px;
  width: 100%;
  .n-base-selection-label {
    height: 28px;
  }
}

#comp_desc_container {
  display: none;
}

#comp_desc {
  height: fit-content;
}

.validation_error_text {
  font-size: 12px;
  color: #e80505;
  font-weight: 400;
}

.bug-new_filename {
  color: grey;
  font-weight: 600;
  margin-left: 6px;
}

.collection-list-title {
  &:hover {
    cursor: pointer;
    color: @primaryColor;
  }
}

#titles #subtitle {
  font-weight: 600;
}